package com.dy.programhelper.rabbitmq_sender;



import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j
@Api(tags="测试")
@RequestMapping("/test")
public class OrderController {

    @Autowired
    private OrderMessageProducer orderMessageProducer;
    /**
     * 发送保存订单消息
     *
     * @param message
     */

    @GetMapping(value = "/sendSaveMessage")
    @ApiOperation(value = "接口名", notes = "接口描述", httpMethod = "GET")
    public void sendSaveOrderMessage(@RequestParam("message") String message) {
        //发送消息
        orderMessageProducer.sendMsg(message);
        log.info("发送保存订单消息成功");
    }
}
